// mock.js
const mockData = {
  "msg": "操作成功",
  "code": 200,
  "data": [
    {
      "createBy": null,
      "createTime": null,
      "updateBy": null,
      "updateTime": null,
      "remark": null,
      "firstCatalog": {
        "createBy": null,
        "createTime": "2025-04-01 14:46:08",
        "updateBy": null,
        "updateTime": null,
        "remark": null,
        "parentName": null,
        "parentId": 0,
        "orderNum": 1,
        "ancestors": null,
        "children": [
          {
            "createBy": null,
            "createTime": "2025-04-01 14:48:06",
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "parentName": null,
            "parentId": 1,
            "orderNum": 1,
            "ancestors": null,
            "children": [
              {
                "createBy": null,
                "createTime": "2025-04-01 14:58:34",
                "updateBy": null,
                "updateTime": null,
                "remark": null,
                "parentName": null,
                "parentId": 6,
                "orderNum": 1,
                "ancestors": null,
                "children": [],
                "id": 7,
                "name": "电气元件",
                "level": 3,
                "status": "1"
              }
            ],
            "id": 6,
            "name": "低压配电",
            "level": 2,
            "status": "1"
          }
        ],
        "id": 1,
        "name": "备品备件",
        "level": 1,
        "status": "1"
      },
      "childrenCatalog": [
        {
          "createBy": null,
          "createTime": "2025-04-01 14:48:06",
          "updateBy": null,
          "updateTime": null,
          "remark": null,
          "parentName": null,
          "parentId": 1,
          "orderNum": 1,
          "ancestors": null,
          "children": [
            {
              "createBy": null,
              "createTime": "2025-04-01 14:58:34",
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "parentName": null,
              "parentId": 6,
              "orderNum": 1,
              "ancestors": null,
              "children": [],
              "id": 7,
              "name": "电气元件",
              "level": 3,
              "status": "1"
            }
          ],
          "id": 6,
          "name": "低压配电",
          "level": 2,
          "status": "1"
        }
      ]
    },
    {
      "createBy": null,
      "createTime": null,
      "updateBy": null,
      "updateTime": null,
      "remark": null,
      "firstCatalog": {
        "createBy": null,
        "createTime": "2025-04-01 14:46:35",
        "updateBy": null,
        "updateTime": null,
        "remark": null,
        "parentName": null,
        "parentId": 0,
        "orderNum": 2,
        "ancestors": null,
        "children": [
          {
            "createBy": null,
            "createTime": "2025-04-01 14:49:06",
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "parentName": null,
            "parentId": 2,
            "orderNum": 1,
            "ancestors": null,
            "children": [
              {
                "createBy": null,
                "createTime": "2025-04-01 14:59:34",
                "updateBy": null,
                "updateTime": null,
                "remark": null,
                "parentName": null,
                "parentId": 8,
                "orderNum": 1,
                "ancestors": null,
                "children": [],
                "id": 9,
                "name": "手动工具",
                "level": 3,
                "status": "1"
              }
            ],
            "id": 8,
            "name": "五金工具",
            "level": 2,
            "status": "1"
          }
        ],
        "id": 2,
        "name": "工具耗材",
        "level": 1,
        "status": "1"
      },
      "childrenCatalog": [
        {
          "createBy": null,
          "createTime": "2025-04-01 14:49:06",
          "updateBy": null,
          "updateTime": null,
          "remark": null,
          "parentName": null,
          "parentId": 2,
          "orderNum": 1,
          "ancestors": null,
          "children": [
            {
              "createBy": null,
              "createTime": "2025-04-01 14:59:34",
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "parentName": null,
              "parentId": 8,
              "orderNum": 1,
              "ancestors": null,
              "children": [],
              "id": 9,
              "name": "手动工具",
              "level": 3,
              "status": "1"
            }
          ],
          "id": 8,
          "name": "五金工具",
          "level": 2,
          "status": "1"
        }
      ]
    },
    {
      "createBy": null,
      "createTime": null,
      "updateBy": null,
      "updateTime": null,
      "remark": null,
      "firstCatalog": {
        "createBy": null,
        "createTime": "2025-04-01 14:47:00",
        "updateBy": null,
        "updateTime": null,
        "remark": null,
        "parentName": null,
        "parentId": 0,
        "orderNum": 3,
        "ancestors": null,
        "children": [
          {
            "createBy": null,
            "createTime": "2025-04-01 14:50:06",
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "parentName": null,
            "parentId": 3,
            "orderNum": 1,
            "ancestors": null,
            "children": [
              {
                "createBy": null,
                "createTime": "2025-04-01 15:00:34",
                "updateBy": null,
                "updateTime": null,
                "remark": null,
                "parentName": null,
                "parentId": 10,
                "orderNum": 1,
                "ancestors": null,
                "children": [],
                "id": 11,
                "name": "车床加工",
                "level": 3,
                "status": "1"
              }
            ],
            "id": 10,
            "name": "机械加工",
            "level": 2,
            "status": "1"
          }
        ],
        "id": 3,
        "name": "机加工与设备",
        "level": 1,
        "status": "1"
      },
      "childrenCatalog": [
        {
          "createBy": null,
          "createTime": "2025-04-01 14:50:06",
          "updateBy": null,
          "updateTime": null,
          "remark": null,
          "parentName": null,
          "parentId": 3,
          "orderNum": 1,
          "ancestors": null,
          "children": [
            {
              "createBy": null,
              "createTime": "2025-04-01 15:00:34",
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "parentName": null,
              "parentId": 10,
              "orderNum": 1,
              "ancestors": null,
              "children": [],
              "id": 11,
              "name": "车床加工",
              "level": 3,
              "status": "1"
            }
          ],
          "id": 10,
          "name": "机械加工",
          "level": 2,
          "status": "1"
        }
      ]
    },
    {
      "createBy": null,
      "createTime": null,
      "updateBy": null,
      "updateTime": null,
      "remark": null,
      "firstCatalog": {
        "createBy": null,
        "createTime": "2025-04-01 14:47:16",
        "updateBy": null,
        "updateTime": null,
        "remark": null,
        "parentName": null,
        "parentId": 0,
        "orderNum": 4,
        "ancestors": null,
        "children": [
          {
            "createBy": null,
            "createTime": "2025-04-01 14:51:06",
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "parentName": null,
            "parentId": 4,
            "orderNum": 1,
            "ancestors": null,
            "children": [
              {
                "createBy": null,
                "createTime": "2025-04-01 15:01:34",
                "updateBy": null,
                "updateTime": null,
                "remark": null,
                "parentName": null,
                "parentId": 12,
                "orderNum": 1,
                "ancestors": null,
                "children": [],
                "id": 13,
                "name": "清洗剂",
                "level": 3,
                "status": "1"
              }
            ],
            "id": 12,
            "name": "工业清洗",
            "level": 2,
            "status": "1"
          }
        ],
        "id": 4,
        "name": "化学品",
        "level": 1,
        "status": "1"
      },
      "childrenCatalog": [
        {
          "createBy": null,
          "createTime": "2025-04-01 14:51:06",
          "updateBy": null,
          "updateTime": null,
          "remark": null,
          "parentName": null,
          "parentId": 4,
          "orderNum": 1,
          "ancestors": null,
          "children": [
            {
              "createBy": null,
              "createTime": "2025-04-01 15:01:34",
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "parentName": null,
              "parentId": 12,
              "orderNum": 1,
              "ancestors": null,
              "children": [],
              "id": 13,
              "name": "清洗剂",
              "level": 3,
              "status": "1"
            }
          ],
          "id": 12,
          "name": "工业清洗",
          "level": 2,
          "status": "1"
        }
      ]
    },
    {
      "createBy": null,
      "createTime": null,
      "updateBy": null,
      "updateTime": null,
      "remark": null,
      "firstCatalog": {
        "createBy": null,
        "createTime": "2025-04-01 14:47:42",
        "updateBy": null,
        "updateTime": null,
        "remark": null,
        "parentName": null,
        "parentId": 0,
        "orderNum": 5,
        "ancestors": null,
        "children": [
          {
            "createBy": null,
            "createTime": "2025-04-01 14:52:06",
            "updateBy": null,
            "updateTime": null,
            "remark": null,
            "parentName": null,
            "parentId": 5,
            "orderNum": 1,
            "ancestors": null,
            "children": [
              {
                "createBy": null,
                "createTime": "2025-04-01 15:02:34",
                "updateBy": null,
                "updateTime": null,
                "remark": null,
                "parentName": null,
                "parentId": 14,
                "orderNum": 1,
                "ancestors": null,
                "children": [],
                "id": 15,
                "name": "打印纸",
                "level": 3,
                "status": "1"
              }
            ],
            "id": 14,
            "name": "办公用品",
            "level": 2,
            "status": "1"
          }
        ],
        "id": 5,
        "name": "行政办公",
        "level": 1,
        "status": "1"
      },
      "childrenCatalog": [
        {
          "createBy": null,
          "createTime": "2025-04-01 14:52:06",
          "updateBy": null,
          "updateTime": null,
          "remark": null,
          "parentName": null,
          "parentId": 5,
          "orderNum": 1,
          "ancestors": null,
          "children": [
            {
              "createBy": null,
              "createTime": "2025-04-01 15:02:34",
              "updateBy": null,
              "updateTime": null,
              "remark": null,
              "parentName": null,
              "parentId": 14,
              "orderNum": 1,
              "ancestors": null,
              "children": [],
              "id": 15,
              "name": "打印纸",
              "level": 3,
              "status": "1"
            }
          ],
          "id": 14,
          "name": "办公用品",
          "level": 2,
          "status": "1"
        }
      ]
    }
  ]
};

const getMockData = () => {
  return new Promise((resolve) => {
    setTimeout(() => {
      resolve(mockData);
    }, 500);
  });
};

module.exports = {
  mockData,
  getMockData
};
